package com.huabo.contract.oracle.mapper;

import com.hbfk.util.PageInfo;
import com.huabo.contract.oracle.entity.TblYyXdfCompany;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author huabo
 * @since 2022-04-07
 */
public interface TblYyXdfCompanyMapper extends BaseMapper<TblYyXdfCompany> {

    @SelectProvider(method="selectListByPageInfo",type=TblYyXdfCompanyMapperSqlConifg.class)
    @Results({
            @Result(column="REALNAME",property="staff.realname")
    })
    List<TblYyXdfCompany> selectListByPageInfo(PageInfo<TblYyXdfCompany> pageInfo);
    @SelectProvider(method="selectCountByPageInfo",type=TblYyXdfCompanyMapperSqlConifg.class)
    Integer selectCountByPageInfo(PageInfo<TblYyXdfCompany> pageInfo);

    @SelectProvider(method="findBySqlPage",type=TblYyXdfCompanyMapperSqlConifg.class)
    @Results({
            @Result(column="REALNAME",property="staff.realname")
    })
    List<TblYyXdfCompany> findBySqlPage(PageInfo<TblYyXdfCompany> pageInfo);
    @SelectProvider(method="findCountBySqlPage",type=TblYyXdfCompanyMapperSqlConifg.class)
    Integer findCountBySqlPage(PageInfo<TblYyXdfCompany> pageInfo);

    @Select("SELECT count(*) from TBL_YY_COMPANY where teamid= #{teamid}")
    Integer listBySqlPageCount(BigDecimal teamid);

    @InsertProvider(method="insertCompany",type=TblYyXdfCompanyMapperSqlConifg.class)
    void insertCompany(TblYyXdfCompany company);

}
